package com.neuronbit.businessflow.flow.parser;

import com.neuronbit.javaparser.ast.CompilationUnit;
import com.neuronbit.javaparser.ast.body.ClassOrInterfaceDeclaration;
import com.neuronbit.businessflow.flow.clazz.ClassInfo;
import com.neuronbit.businessflow.flow.clazz.ExceptionTypeInfo;
import com.neuronbit.businessflow.intellij.model.Flow;
import com.neuronbit.javaparser.resolution.types.ResolvedType;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;

import java.util.*;

import static org.apache.commons.lang3.StringUtils.capitalize;

/**
 * The type Flow node.
 */
@Getter
@Setter
public class FlowNode extends Flow implements CallableNode {
    private Output output;
    private ExceptionTypeInfo[] exceptionTypes;
    private CompilationUnit compilationUnit;

    /**
     * Instantiates a new Flow node.
     *
     * @param id   the id
     * @param name the name
     */
    public FlowNode(String id, String name) {
        super(id, name);
    }

    /**
     * Gets input class name.
     *
     * @return the input class name
     */
    public String getInputClassName() {
        return capitalize(capitalize(this.getName()) + "Param");
    }
}
